# $Id: PKGBUILD 87120 2013-03-27 15:21:01Z ttoepper $
# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
# Contributor: Olivier Médoc <o_medoc@yahoo.fr>
# Contributor: Ashok `ScriptDevil` Gautham <ScriptDevil.Arch@gmail.com>

pkgname=libdbi-drivers
pkgver=0.9.0
pkgrel=1
pkgdesc="Database drivers for libdbi (MySQL, PostgreSQL, and SQLite)"
url="http://libdbi-drivers.sourceforge.net/"
license=('GPL')
arch=('i686' 'x86_64')
depends=('libdbi')
makedepends=('postgresql-libs' 'libmariadbclient' 'sqlite2' 'sqlite')
optdepends=("postgresql-libs: To work with postgresql using libdbdpgsql "
			"sqlite3: To work with sqlite3 using libdbdsqlite3"
			"libmariadbclient: To work with mysql using libdbdmysql"
			"sqlite2: To work with sqlite2 using libdbdsqlite")
options=(!libtool)
install=libdbi-drivers.install
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha1sums=('8472875d30c216540d48d591b442e40ba4f7df5d')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr \
  	--disable-docs \
  	--with-libdbi \
	--with-mysql \
	--with-pgsql \
	--with-sqlite \
	--with-sqlite3
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR=${pkgdir} install
}

